using System;
using Headsight.BPMN2WF.BPMN.BlockModel;
using Headsight.BPMN2WF.BPMN.Model;
using Headsight.BPMN2WF.BPMN.Schemas;

namespace Headsight.BPMN2WF.BPMN
{
    public class BPMNFlowNodesBlockFactory : IBPMNFlowNodesBlockFactory
    {
        public BPMNFlowNodesBlock CreateBPMNFlowNodesBlock(tDefinitions tDefinitions)
        {
            var stage1 = new Model.BPMNFlowNodesBlockFactory();
            var stage2 =
               new BPMNFlowNodesBlock2BlockTransformerImpl();
               //  new BPMNFlowNodesBlock2BlockTransformerImpl2();
                // new BPMNFlowNodesBlock2BlockTransformerPassThrough();
            
            var resultImmediate = stage1.CreateBPMNFlowNodesBlock(tDefinitions);
            var result = stage2.Transform(resultImmediate);

            return result;
        }
    }
}